/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FacturaOnline.java
 *
 * Created on 21/05/2011, 09:31:04 PM
 */

package GUI;

import Interfaz.InterfazControl;
import Motor.ClaseUtilitaria;
import Motor.Cliente;
import javax.swing.ImageIcon;

/**
 *
 * @author Vane
 */
public class FacturaOnline extends javax.swing.JFrame {

    /** Creates new form FacturaOnline */
	private InterfazControl laInterfaz;
	
    public FacturaOnline(InterfazControl laInterfaz) {
        this.laInterfaz=laInterfaz;
		initComponents();
		this.setLocationRelativeTo(null); // Cambiar icono de java en ventana
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
		jTFecha.setText(ClaseUtilitaria.tenerFechaActual());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jTFecha = new javax.swing.JTextField();
        jTFactura = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jTNombreCliente = new javax.swing.JTextField();
        jTRifCi = new javax.swing.JTextField();
        jTDireccion = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jBImprimir = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        jTSucursal = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(400, 500));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 94, 100);

        jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 14));
        jLabel2.setText("Factura Online");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(160, 30, 130, 19);

        jLabel3.setText("Fecha:");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(230, 70, 40, 14);

        jLabel8.setText("Nro Factura");
        getContentPane().add(jLabel8);
        jLabel8.setBounds(230, 90, 70, 14);

        jTFecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFechaActionPerformed(evt);
            }
        });
        getContentPane().add(jTFecha);
        jTFecha.setBounds(300, 70, 70, 20);
        getContentPane().add(jTFactura);
        jTFactura.setBounds(300, 90, 70, 20);

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel4.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(50, 450, 320, 20);

        jLabel5.setText("Dirección");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(20, 230, 80, 14);

        jLabel6.setText("Nombre:");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(20, 190, 60, 14);

        jLabel7.setText("RIF/CI:");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(20, 210, 60, 14);
        getContentPane().add(jTNombreCliente);
        jTNombreCliente.setBounds(90, 190, 280, 20);

        jTRifCi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTRifCiActionPerformed(evt);
            }
        });
        getContentPane().add(jTRifCi);
        jTRifCi.setBounds(90, 210, 280, 20);
        getContentPane().add(jTDireccion);
        jTDireccion.setBounds(90, 230, 280, 20);

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Código", "Descripción", "Precio"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.Float.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(20, 260, 350, 120);

        jBImprimir.setLabel("Imprimir Factura");
        jBImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBImprimirActionPerformed(evt);
            }
        });
        getContentPane().add(jBImprimir);
        jBImprimir.setBounds(100, 400, 190, 23);

        jLabel9.setText("Sucursal:");
        getContentPane().add(jLabel9);
        jLabel9.setBounds(10, 100, 80, 20);

        jTSucursal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTSucursalActionPerformed(evt);
            }
        });
        getContentPane().add(jTSucursal);
        jTSucursal.setBounds(10, 120, 100, 30);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jTSucursalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTSucursalActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTSucursalActionPerformed

	private void jTRifCiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTRifCiActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTRifCiActionPerformed

	private void jBImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBImprimirActionPerformed
		// TODO add your handling code here:
			this.dispose();
	}//GEN-LAST:event_jBImprimirActionPerformed

	private void jTFechaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFechaActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTFechaActionPerformed

    /**
    * @param args the command line arguments
    */
 

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBImprimir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTDireccion;
    private javax.swing.JTextField jTFactura;
    private javax.swing.JTextField jTFecha;
    private javax.swing.JTextField jTNombreCliente;
    private javax.swing.JTextField jTRifCi;
    private javax.swing.JTextField jTSucursal;
    private javax.swing.JTable jTable1;
    // End of variables declaration//GEN-END:variables

}
